#ifndef VLOG_H
#define VLOG_H
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#ifdef __ANDROID__
#include <android/log.h>
typedef enum android_LogPriority {
    ANDROID_LOG_UNKNOWN = 0,
    ANDROID_LOG_DEFAULT,    /* only for SetMinPriority() */
    ANDROID_LOG_VERBOSE,
    ANDROID_LOG_DEBUG,
    ANDROID_LOG_INFO,
    ANDROID_LOG_WARN,
    ANDROID_LOG_ERROR,
    ANDROID_LOG_FATAL,
    ANDROID_LOG_SILENT,     /* only for SetMinPriority(); must be last */
} android_LogPriority;
#endif

void log(int prio, const char * LEVEL_TAG, const char *format, ...);

#undef LOG_TAG
#define LOG_TAG "vision_native"

#ifdef __ANDROID__
#define LOGI(...) {log(ANDROID_LOG_INFO, "I", __VA_ARGS__);}
#define LOGE(...) {log(ANDROID_LOG_ERROR, "E",  __VA_ARGS__);}
#else
#define LOGI(...) {log(0, "I", __VA_ARGS__);}
#define LOGE(...) {log(0, "E",  __VA_ARGS__);}
#endif


#endif  // NOLINT
